Control of magnetic sector mass spectrometer magnet

ABSTRACT

A control system for controlling a magnet of a magnetic sector mass spectrometer comprises a magnetic field sensor for sensing the magnetic field of the magnet and generating an output representative thereof; a set point generator configured to generate an output representative of, or related to, a desired magnetic field of the magnet; and a digital controller configured to receive a variable digital input signal from the output of the magnetic field sensor and a set point digital input signal from the output of the set point generator, and to generate a digital output from which is derived a control signal for controlling a current to the magnet so as to control the magnetic field thereof. The control system is arranged to apply to the digital controller a selected one of a plurality of different controller settings, in accordance with the desired magnetic field of the magnet.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation under 35 U.S.C. § 120 andclaims the priority benefit of co-pending U.S. patent application Ser.No. 15/532,935, filed Jun. 2, 2017, which is a National Stageapplication under 35 U.S.C. § 371 of PCT Application No.PCT/EP2015/078577, filed Dec. 3, 2015. The disclosure of the foregoingapplication is incorporated herein by reference.

DESCRIPTION Field of the Invention

This invention relates to the control of a magnetic sector massspectrometer magnet. In particular it relates to circuitry and a methodfor closed loop control of the magnet.

BACKGROUND OF THE INVENTION

Magnetic sector mass analyzers are a well-known class of massspectrometer, for high resolution analysis of ions across a relativelywide mass range. Ions are accelerated through a flight tube under theinfluence of an accelerating voltage U₀ where they separate in time offlight. The kinetic energy of ions at the end of the acceleratingprocess, mv²/2, is a result of the energy imparted by the acceleratingfield, z.U₀; hence

${z \cdot U_{0}} = \frac{m \cdot v^{2}}{2}$

As the moving ions enter the magnetic field created by a magnet, chargedions of a particular mass to charge ratio m/z are deflected along acircular path of unique radius r_(m) in a direction perpendicular to thedirection of the applied magnetic field. As will be well known, theforce due to the magnetic field (z.v.B, where z is the ionic charge, vis the ion velocity, and B is the magnetic field strength) balances thecentripetal force mv²/r_(m).

Rearranging for v and substituting into the equation above yields:

$\frac{m}{z} = \frac{B^{2} \cdot r_{m}^{2}}{2 \cdot U_{0}}$

In other words, ions of a particular mass to charge ratio will follow acurved path of radius r_(m) for a given magnetic flux density B and whenaccelerated to a particular potential U₀.

In a sector mass analyzer, the relative positions of the ion source,accelerator region, magnet and detector are fixed. Hence ions of aparticular species will only arrive at the detector (rather than thewalls of the analyzer for example) at a specific B and U₀.

For detecting a particular mass, it is necessary to control (ie holdsteady) the magnetic field to a high degree of accuracy. Of course, theaccelerating potential U₀ must also be held constant but this isrelatively straightforward; also note from the equation above that theposition of ions as they arrive at the detector (related to r_(m)) isproportional to B⁻¹ but is less sensitive to changes in U₀ as r_(m)depends on the square root of U₀.

Both U₀ and B can in principle be varied to scan multiple ion speciesacross the detector. However, it is preferable, for a particularexperiment, that U₀ be held constant whilst B is changed. This isprimarily because, in a magnetic sector mass analyzer, the focal pointof the ions changes with U₀ and it is desirable that the ion beam remainfocused on the detector.

It is known in the art to measure the flux density generated by themagnet by an appropriate sensor, and to use this signal to regulate themagnetic field. See for example U.S. Pat. No. 3,597,679. An appropriatesensor is typically either a Hall effect sensor or a Field probe.

A typical set-up is shown in FIG. 1. The flux density within the magnetis measured using a field probe 10 or the like. The analogue signaloutput from the field probe 10 is amplified and then connected to afirst input of an operational amplifier 20. A set value is generated asa digital signal at a microcontroller 30 and is converted to an analoguesignal at DAC 40. The output of the DAC 40 is connected to the secondinput of the operational amplified 20 so that the (analogue) measuredflux density can be compared with the analogue set point.

The output of the operational amplifier 20 is amplified in a poweramplifier 50 and the power amplifier 50 output is used to control thecurrent supplied to the magnet in the magnetic sector mass spectrometer.The magnetic flux density measured by the field probe 10 can thus beused to control the set value, and, in this manner, an analogue closedloop feedback control is effected. Moreover,proportional-integral-differential (PID) control of the operationalamplifier (and in principle the amplification of the measured fluxdensity) is possible.

Although a step resolution of the magnetic flux density achievable inthe arrangement of FIG. 1 is limited by the resolution of the DAC 40,nevertheless the stability of the magnetic flux within one DAC step canbe much higher, depending, for example, on the operational amplifier 20and other part of the electronics.

The primary use of magnetic sector mass spectrometry is for thedetermination of abundances of known elements in samples (in contrastto, for example, Orbitrap® or TOF Mass Spectrometry, which typicallyseek to identify unknown elements in samples, or to confirm or refutethe presence of a particular substance, or, more usually, a group ofsubstances. This is why maximum stability of the magnetic field isdesirable: a highly constant magnetic field at a given U₀ will ensurethat ions of a particular m/z (and only ions of that specific m/z) areproperly focused on the detector, and remain so over time. Inconsequence, magnetic field stability is directly linked to instrumentresolution; for ions of two adjacent masses, the ability to discriminatebetween them (ie to measure one species but not the other) will be aconsequence of magnetic field stability. For an instrument resolution ofaround 20,000, the standard deviation of the magnetic flux density needsto be stable to within 3 ppm over an hour. For an instrument resolutionof 50,000, the standard deviation of the magnetic flux density needs tobe stable to within 1 ppm over an hour. Even higher resolutions would bedesirable.

In addition to the requirement for a highly stable stationary magneticfield, it is also desirable that the magnet of a sector analyzer becapable of jumping between two stable magnetic flux density values, inorder to measure the intensity (quantity) of two different ion species.The jump should be as fast as possible, whilst the magnetic flux densitywithin the magnet following the jump must be stable for the reasonsexplained above. This is especially demanding, as reorientation of themagnetic domains within the magnet material is governed by a relativelyslow time constant.

Remanent magnetization within the magnet core may also present achallenge. In particular, the homogeneity of the magnetic flux densitymay reduce across the magnet, particularly when jumping from arelatively higher to a relatively lower magnetic field. Furthermore, themagnetic flux density at the position of the magnetic field probe maythen differ from the magnetic flux density at the position of the ionbeam. The magnet jump will take a considerably longer time when thetarget magnetic flux density is low.

FIG. 2a illustrates a plot of magnetic flux density, B, against magneticfield strength, H, for 1006 Steel (source: Femm 4.2 (finite elementmagnetic simulation software, David Meeker). From that figure thenon-linearity of B vs H is very clear. FIG. 2b is derived from PaulOxley et al, Journal of Magnetism and Magnetic Materials 321 (2009)2107-2114 and illustrates hysteresis effects as the magnetic fieldjumps. FIG. 2b shows how the H field (Magnetic field strength, measuredin A/m, and proportional to magnet current)) necessary to reach acertain flux density value depends on the history (jump size) and,moreover, just how non-linear the behavior is.

The result of this is that a single set of PID parameters is generallyinappropriate to cover all possible jump sizes and flux densities. Inparticular, the PID parameters determined for a jump between a firstpair of magnetic field strengths may not be appropriate—or at least, notoptimal—for a jump between a second, different pair of magnetic fieldstrengths. Jumping between different magnetic flux densities means thatdifferent time constants would have to be considered, e.g. the timeconstant of the power stage, the time constant of the ordering of themagnetic domains, and the time constant for heating up the magnets.

Furthermore, even once the magnetic field is nominally stationary (ie isnot in the process of jumping from one value to another) the PIDparameters are fixed for all values of B and U₀ . In practice this meansthat they are at best a compromise, and for certain combinations oftarget flux densities and jump sizes, may not be very appropriate atall. Even for a given nominal magnetic flux density, optimal PIDparameters will depend upon device specific conditions such as theparticular location of the field sensor within the magnet gap and soforth.

The electronic circuit of FIG. 1 also itself introduces potentialsources of both random and systematic error to the magnetic flux densityin the magnet gap. For example, the output of the magnetic field probealways contains some noise. Smoothing is typically done by applying RCelements. It is challenging to optimize the circuitry in order to smoothaway the noise, but at the same time not sacrifice time information.Also there are a number of possible sources for drift effects, e.g. dueto temperature changes, especially in the field sensor 10, theoperational amplifier 20 and the DAC 40 of FIG. 1. Addressing theseeffects requires elaborate and costly electronic designs, e.g.temperature stabilization and/or calibration.

Typically, the magnetic flux density B in a magnetic sector massspectrometer will be variable between a few tens of mT and a fewhundreds of mT, up to about 1 T. In a currently preferred instrument,for example, the flux density inside the magnet gap is variable between200 mT and 750 mT. The flux density in the iron core of the magnets istypically higher by a factor of up to 2, depending upon magnet designand geometry. Fast jumps can occur over the full mass range.

A. A. Malafronte, M. N. Martins, Proceedings of 2005 ParticleAccelerator Conference, Knoxville, Tenn., page 2833ff describe anarrangement for controlling the magnetic field in a microtron. Theoutput of a Hall sensor is converted to a digital signal using a 16 bitADC. A digital set point for the control loop is generated and amicrocontroller compares the digital set point with the digitized Hallsensor output. A digital control signal is then generated as an outputfrom the microcontroller as a result of the comparison. That digitaloutput is supplied to a 16 bit DAC which provides an output that isamplified in an analogue driver. The output of the driver in turncontrols the current to the magnet power supply.

The Malafronte arrangement is aimed at reducing cost. Magnetic fieldstability and jump speed between different magnetic flux densities arenot critical to the considerations in the microtron controllerdescribed; flux stability of 30 ppm is noted, which is an order ofmagnitude or poorer than is needed for a high resolution (20,000 orhigher) magnetic sector mass spectrometer.

Against this background, the present invention seeks to provide animproved arrangement and method for control of the magnetic field in amagnetic sector mass analyzer.

BRIEF SUMMARY OF THE INVENTION

According to a first aspect of the present invention, there is provideda control system for controlling a magnet of a magnetic sector massspectrometer in accordance with claim 1.

In its broadest sense, this aspect of the invention thus provides adigital controller for a magnetic sector mass spectrometer, to whichdifferent controller settings are applied depending upon the specificparameters of the mass spectrometer.

For a given configuration of a magnetic sector mass spectrometer, ionswill move through it in accordance with a set of potentially variableparameters: for example, an accelerating potential of the massspectrometer, a magnetic field generated by the magnet, the mass tocharge ratio of the ions, the relative positions of an ion source and adetector, and so forth. In order for ions of a particular mass to chargeratio to pass through the mass spectrometer and arrive at the detector,specific mass spectrometer parameters need to be set. In accordance withthe first aspect of the invention, appropriate settings for thecontroller—for example, the constants of a transfer function of thecontrol loop—can be selected in accordance with the particular massspectrometer parameters. In one preferred embodiment, the control systemmay employ a look up table in which predetermined or calibratedcontroller settings have been stored. Then, by reference to that look uptable, a particular controller setting can be selected in accordancewith the specific mass spectrometer parameters that are to be employedin analysis of a sample. In particular, the look up table may containmultiple difference controller settings determined to be particularlysuitable for specific magnetic flux densities, acceleration voltages,mass to charge ratios, etc.

As an alternative to a look up table, the control system may insteadstore a functional relationship from which control settings may becalculated, depending upon the mass spectrometer parameters. Forexample, a functional relationship between the magnetic flux density inthe magnet and the controller settings may be determined empirically orheuristically from prior experimentation/calibration. Then, duringsubsequent analysis of sample ions, the appropriate controller settingscan be determined from the stored functional relationship once theappropriate magnetic flux density and so forth has been identified.

In a preferred embodiment of the invention, the magnetic field sensor isa magnetoresistive single crystal sensor or a Hall sensor derived from asingle crystal. The (analogue) output of such a sensor is, preferably,converted to a digital signal at or immediately adjacent to the sensorusing an ADC. The digital part of the control system is insensitive totemperature fluctuations. By locating the ADC at or adjacent to thefield sensor, temperature control requirements are localized.

In order to control the temperature at the field sensor, in a simpleembodiment a temperature sensor is employed to provide a correctionsignal to the ADC. In a more complex preferred arrangement, temperaturecontrol of the field sensor may be achieved by the use of a temperaturesensor, a temperature controller and a heater/cooler, the temperaturesensor providing a measured input to the temperature controller forcomparison against a set point temperature input, the temperaturecontroller generating a control signal output to the heater/cooler so asto reduce an error between the set point and measured temperatureinputs.

The field sensor is in preference enclosed within a housing to assistwith temperature regulation.

The control system may further comprise a digital filter arranged tofilter the ADC output, such as an infinite impulse response filter.Particularly preferred is a Chebyshev type I filter.

The output of the digital controller may be converted into an analoguesignal that is used to control a current to the magnet. Optionally, thedigital controller output may be converted to an analogue signal using adigital to analogue converter (DAC) arrangement that may, for example,include first and second DACs. The output of the DAC arrangement may beamplified using an operational amplifier the output of which drives apower amplifier.

Desirably, the control system may further comprise an analogue feedbackcircuit connected between a coil of the magnet and the DAC arrangement.The feedback circuit may be used to provide an analogue feedback loopwith a switchable frequency response. The filtered output may becombined with the output of the DAC arrangement at the operationalamplifier that drives the power stage. This allows for correctingfluctuations at shorter timescales than the cycle time of the digitalloop.

The invention also extends to a magnetic sector mass spectrometercomprising an ion source arranged to generate a beam of ions having amass to charge ratio m/z; an ion accelerator arranged to accelerate ionsto a potential U_(o); a magnet under the control of the control systemset out above, arranged to divert the accelerated ions along a circularpath in accordance with m/z, U_(o) and the magnetic flux density withinthe magnet; and an ion detector downstream of the magnet for receivingand detecting ions from the magnet.

Preferred embodiments of the invention provide various techniques forestablishing the plurality of controller settings. For example, the massspectrometer parameters can be adjusted so as to align the edge of amass spectral peak with the detector. The edge of a peak is typicallyvery sharp (that is, the intensity of the peak rises very rapidly withsmall changes in the magnetic flux density). Thus detecting the changein ion intensity at the detector can provide an accurate measurement ofchanges in magnetic flux density. By aligning the edge of the massspectral peak with the detector and then perturbing the parameters ofthe mass spectrometer (for example, by introducing a perturbation intothe current supplied to the magnet, so as in turn to perturb themagnetic flux density, or perturbing the accelerating electric field),controller settings for that set of mass spectrometer parameters(specifically, for that magnetic flux density) can be determined. Forexample, if the controller uses Proportional-Integral-Differential (PID)control, perturbing the magnetic field around the edge of the mass peakcan allow the transfer function constants (one or more of theproportional, integral or differential constants). The thus determinedcontroller settings can be stored for future use when analyzing ionsusing the same or similar mass spectrometer parameters.

This technique can be employed both to ascertain suitable controllersettings for a stationary magnetic field, and also for determiningsuitable controller settings to optimize a transition between twomagnetic fields. In a particularly preferred embodiment, the controllersystem may employ a first controller setting for a transition betweentwo magnetic fields, to optimize the speed and accuracy of thattransition—for example, to minimize overshoot—and then may apply asecond, different controller setting once the system has reached thegoal magnetic field, the second controller setting being optimized tomaintain the magnetic flux density as constant as possible there.

The invention also extends to a method of controlling a magnetic fieldgenerated by a magnet in a magnetic sector mass spectrometer, inaccordance with claim 23.

In further aspects of the present invention, methods are provided fordetermining controller settings for a controller, the controller beingarranged to control a magnetic field generated by a magnet in a magneticsector mass spectrometer. The methods are defined in claims 50 and 51.

The invention also extends to a method of controlling a magnetic fieldgenerated by a magnet in a magnetic sector mass spectrometer comprisinggenerating ions of a plurality of ion species; accelerating thegenerated ions with an electrical potential U₀; directing theaccelerated ions into the magnet, the magnet being configured togenerate a magnet field of flux density B so as to cause ions enteringit to be deflected along a curved path; and detecting ions exiting themagnet at an ion detection arrangement; wherein ions of a firstsacrificial ion species have a mass to charge ratio (m/z)₁ and follow afirst curved path within the magnet whilst ions of a second, analyte ionspecies different to the sacrificial species have a mass to charge ratio(m/z)₂ and follow a second curved path, different to the first curvedpath, within the magnet; and further wherein the ion detectionarrangement has a plurality of spatially separated detectors; the methodfurther comprising: adjusting one or more of the flux density B, theacceleration potential U₀ and/or the position of a detector or detectorsin the ion detection arrangement, so that ions of the sacrificialspecies are directed toward a first detector in order that the edge of amass peak representative of those ions of the sacrificial species isaligned with the first detector, whilst ions of the analyte ion speciesare directed toward a second detector, spatially separated from thefirst detector, so that a mass peak representative of those analyte ionsis generally aligned with the second detector away from the mass peakedges; and controlling the magnetic flux density B by monitoring changesin the detector intensity at the peak edge of the sacrificial mass, soas to maintain the alignment of the analyte ions with the said seconddetector.

The edge of a mass peak in a magnetic sector mass spectrometer istypically sharp. Advantage may be taken of this by directing the peakedge of a sacrificial mass (that is, an ion species that is not ofanalytical interest) at a first detector, whilst ions of a species ofanalytical interest may be directed at a second detector. Smallfluctuations in the magnetic flux density in the magnet will result inlarge changes in the intensity of ions at the first detector because thepeak edge is directed to that first detector. Peak intensity changes canthus be used to provide a feedback signal representative of flux densitychanges to control the magnetic flux. This in turn allows control of theanalyte ions so that they remain directed toward the second detector butaway from the peak edges, ie (for example) at or toward the peak centre.

In still a further aspect of the present invention, a magnetic sectormass spectrometer is provided, comprising: an ion source arranged togenerate a beam of ions containing one or more ion species each having amass to charge ratio (m/z)_(i); an ion accelerator arranged toaccelerate the ions in the ion beam to a potential U_(o); a magnetarranged to divert the accelerated ions along a circular path inaccordance with (m/z)_(i), U₀ and the magnetic flux density B within themagnet; a control system for controlling the magnet, the control systemincluding a set point generator configured to generate an outputrepresentative of, or related to, a desired magnetic field of themagnet; a magnetic field sensor for generating a signal representativeof the flux density B in the magnet; and a digital controller configuredto receive a variable digital input signal from the output of themagnetic field sensor and a set point digital input signal from theoutput of the set point generator, and to generate a digital output fromwhich is derived a control signal for controlling a current to themagnet so as to control, in turn, the magnetic field thereof; and an iondetection arrangement downstream of the magnet for receiving anddetecting ions from the magnet.

Advantages of the invention may include one or more of the following:

Lower costs

Better temperature stability as only the magnetic field sensor has to betaken into account

Better operation security

Faster in regulation

Faster magnet jump between two magnetic flux densities; also differentcontroller settings can be identified for the same start and finishmagnetic flux densities, to achieve different behavior models. Forexample, one controller setting can allow for overshoot, in order toprovide the fastest change between the two magnetic flux densities.Non-periodic behavior may instead be mandated, if overshooting isdisadvantageous, e.g. to protect the SEMs in the detector;

Variable PID or other controller settings are possible, depending onmagnetic flux density value, Magnetic jump size, detector positionand/or instrument age.

Combination of the static and dynamic controller settings leads to avery fast and stable magnetic flux density value

When using a peak edge and a sacrificial mass, even better stability ofthe magnetic flux density can be achieved;

The signal of the magnetic field sensor 140 can be digitally filtered,providing a better compromise between smoothing and time resolution;

As the integral of the ion beam is used for the calibration, it is notnecessary that the position of the probe be adjusted as accurately.Indeed, although it is not preferred to locate the magnetic field sensorwithin a stray field region of the magnet, even then the magnetic fieldsensor position could be calibrated out.

Quality assurance: the derivation of the controller settings can berepeated regularly.

The same magnet current controller and magnetic field sensor can be usedfor a large number of different instruments without any hardwaremodification; only the controller settings have to be changed when usingon a different instrument, thus saving on cost and logistics;

The quality of the magnet can be lower, e.g. the linearity of themagnetic curve and the hysteresis, as this can be calibrated out;

The controller setting determination process as suggested wouldcalibrate the magnetic field sensor in such a way that the completesystem (field sensor, electronics, magnet (more specifically: anintegral of the magnetic flux density at the area covered by the ionbeam) is taken into account.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention may be put into practice in a number of ways, and somepreferred embodiments will now be described by way of example only, andwith reference to the accompanying drawings in which:

FIG. 1 shows a schematic arrangement of a prior art control arrangementfor controlling the magnetic flux density in a magnetic sector massspectrometer;

FIG. 2a shows a plot of magnetic flux density, B, versus magnetic fieldstrength, H, for 1006 Steel;

FIG. 2b shows a plot of magnetic flux density, B, versus magnetic fieldstrength, H, for stainless steel

FIG. 3 shows a schematic arrangement of a magnetic sector massspectrometer having a control system embodying the present invention;

FIG. 4 shows a circuit diagram of a preferred embodiment of the controlsystem of FIG. 3;

FIG. 5 shows, schematically, a field sensor arrangement suitable for usewith the control system of FIGS. 3 and 4;

FIG. 6 shows, in schematic block diagram format, an alternativearrangement of control system to that shown in FIG. 4;

FIG. 7 shows a mass spectral peak as a plot of detector signal intensityvs magnetic flux density for ions of a particular mass to charge ratio;and

FIG. 8 shows an arrangement of ion detectors suitable for use with themagnetic sector mass spectrometer of FIG. 3.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Referring first to FIG. 3, a schematic arrangement of a magnetic sectormass spectrometer 10 is shown. The magnetic sector mass spectrometer hasan ion source 20 for generating a beam of ions 30. The ions in the ionbeam 30 are accelerated by electrostatic plates 40 forming acceleratingion optics, indicated generally in FIG. 3 by reference numeral 50. Theion beam 30 passes through a slit 60 and into a magnet 70. The magnet 70is an electromagnet driven by a current source 80. A magnetic field isthus formed within the magnet bore.

As explained in the Background section above, and as will be familiar tothose skilled in the art, ions entering the magnet 70 will follow acircular path having a radius r_(m) defined as r_(m)=B⁻¹ (2.U₀.(m/z))^(1/2), where U₀ is the accelerating potential applied to the ionsin the accelerating ion optics 50, B is the magnetic flux density in themagnet 70, and (m/z) is the mass to charge ratio of ions of a particularspecies.

The consequence of this is that, for a given accelerating potential andmagnetic field, different ion species in the ion beam 30 will followdifferent paths (that is, curved paths of different radii), dependingupon their m/z. Relatively lighter ions will follow a more tightlycurved path indicated by dotted line 100 whilst relatively heavier ionswill follow a less tightly curved path indicated by dotted line 90.Neither will exit the magnet as a consequence. Ions of a particular m/zwill however have a radius of curvature that results in ions of thatspecies in the ion beam 30 exiting the magnet along path 110. These ionsthen strike a detector 120 which may, for example, contain one or moreFaraday cups and/or secondary electron multipliers (SEMs). In theschematic embodiment of FIG. 3, a single detector 120 is shown forsimplicity. The detector output may be stored, exported to a screen 125,and/or, as will be explained below, in particularly preferredembodiments of the invention, used to tune the settings of a controller130.

The mass spectrometer 10 is under the control of a control system. Itspurpose and function will be described in detail below. In brief,however, the control system provides a closed loop feedback control forthe magnet 70. This is achieved by monitoring/measuring the magneticflux density within the magnet 70. To do this, a magnetic field sensor140 is positioned within the bore of the magnet 70. The preferredconfiguration and constitution of the magnetic field sensor 140 is setout in further detail in connection with FIG. 5 below.

The magnetic field sensor 140 provides a variable input to a controller130. The variable input to the controller 130 is representative of themagnetic flux density at the sensor location within the magnet 70. A setpoint input to the controller is provided, either from an external setpoint generator (not shown in FIG. 3) or pre-programmed within thehardware or firmware of the controller 130 itself. The controller 130compares the variable input from the magnetic field sensor 140 with theset point (target magnetic flux density) and then generates a digitalcontroller output that is converted to an analogue signal at DAC stage220, amplified with amplifier 230, and fed to the magnet current source80. Control of the current supplied to the magnet windings thus in turncontrols the magnetic flux density within the magnet 70.

As with any feedback loop, the arrangement of FIG. 3 has a transferfunction. In a preferred embodiment, the controller 130 usesProportional-Integral-Differential (PID) control, and the controllersettings (for example, the proportional gain, the integral time constantand/or the differential time constant) are selected and applied inaccordance with the parameters of the mass spectrometer 10, such as,particularly, the chosen magnetic flux density B within the magnet 70for a particular ion species, a jump between two magnetic fluxdensities, and so forth.

As will also be seen in FIG. 3, a signal is also tapped off the magnetcoil windings and fed back to the controller 130 via an analogue dampingsection 240, to provide a damping effect upon the driver signal for thecurrent source 80. This will be explained in further detail inconnection with FIG. 4 below.

In the following description, it is to be understood that the controller130 is primarily designed to control the magnetic field in the magnet70, that is, to permit rapid, accurate adjustments between differentmagnetic flux densities (so that multiple ion species can be examinedseparately using the same or a similar location for the detector 120),and also to hold the magnetic flux density in the magnet 70 extremelysteady and accurate whilst measurements of ions of a particular speciesare taken. Nevertheless, it is self-evident from the equation above thatthe acceleration potential U₀ applied to the electrostatic plates 40 ofthe accelerating ion optics 50 must also be known and accurately set. U₀may also vary between experimental analyses, so as to allow a wide rangeof ion species to be analyzed. However, it is not preferred to vary U₀whilst carrying out analysis, since variations in U₀ can alter thefocusing of the ions in the ion beam 30 at the plane of the detector120. Thus, in the following description, unless otherwise discussed, theaccelerating potential U₀ can be treated as fixed during a particularcontroller calibration/tuning or subsequent ion analysis experiment.

Having provided an overview of the feedback system and its position andfunction within the magnetic sector mass spectrometer 10, a particularpreferred embodiment of the controller 130 and associated componentswill now be described. Methods for tuning/calibrating the settings forthe controller 130 will then be described in a separate section.

Preferred Configuration of the Controller 130

A circuit diagram illustrating a particularly preferred arrangement ofthe control system of FIG. 3 is shown in FIG. 4. In FIG. 4, componentscommon to FIG. 3 are labelled with like reference numbers.

The controller 130 of FIGS. 3 and 4 is constituted by a microcontrollerto which a set point (target magnetic flux density) is supplied from aField Programmable Gate Array (FPGA) 210. The magnetic field sensor 140also supplies a variable input to the controller 130 as explained abovein connection with FIG. 3.

The controller 130 is digital. The set point generated by the FPGA 210is a first digital input to the digital controller 130, and the secondinput to the digital controller, from the magnetic field sensor, is alsodigital. The magnetic field sensor is in preference a magnetorestive orHall sensor which generates an analogue output. This is converted to adigital signal using an ADC (not shown in FIG. 4). In preference, theADC is located immediately adjacent the magnetic field sensor (or evenupon/forms a part of the sensor) in order to minimize the effect oftemperature variations upon the magnetic field stability. This will beexplained further in connection with FIG. 6 below.

The controller 130 provides a PID response to the difference between thedigital set point input and the digital (digitized) variable input fromthe magnetic field sensor. The PID settings for the controller 130 are,in an important feature of the arrangement, not fixed. Instead, aplurality of different PID settings is employed, with the specific PIDsetting employed at a given time being dependent upon parameters of themagnetic sector mass spectrometer 10. For example, the PID settingsapplied to the controller 130 may be related to one or more of thepresent magnetic flux density in the magnet 70, the new end set point ofthe magnetic flux density when a different ion species is to bedetected, the magnitude of the jump between the two differing fluxdensities, and so forth. The specific PID settings for a particular setof mass spectrometer parameters may be obtained throughcalibration/tuning at a particular set of mass spectrometer parameters,for example in a manner to be described below, and may be stored as amatrix of values in a memory (not shown in FIG. 4), which may form apart of the controller 130, or may be physically discrete from thecontroller 130 instead. Moreover, although a matrix of value for the PIDparameters of the controller 130 can be stored in the form of a lookuptable, in other arrangements, a functional relationship can be derived,for example deterministically, so that for any set of mass spectrometerparameters, PID settings can be obtained via that functionalrelationship.

The output of the controller 130 is a digital control signal forcontrolling the magnet current, which is derived from the differencebetween the set point and measured inputs with the appropriate PIDparameters applied. That digital output is converted into an analoguesignal by a digital to analogue conversion (DAC) stage 220. The analogueoutput of the DAC stage 220 is received by an amplification module showngenerally at 250 and formed of an operational amplifier 230 that in turnprovides an analogue output to a power stage which forms a part of themagnet current source 80.

An analogue damping section 240 is also provided as a feedback betweenthe magnet coils, the DAC stage 220 and the non-inverting input of theoperational amplifier 230. The analogue damping section includes anadditional field coil at the magnet 70 providing a feedback to theoperational amplifier 230 for setting the magnet current in the powerstage of the magnet current source 80. The analogue damping section 240also includes switchable high or low damping; this allows for a fastercontrol of transients, whereas the digital control with longer cycletimes (<=5 ms) eliminates drift.

In order to achieve maximum stability of the magnetic flux densityexperienced by ions as they traverse the magnet 70, it is desirable thatthe resolution of the analogue output of the DAC stage 220 is very high,so that the current to the magnet coils is in turn very accuratelycontrolled. One preferred way of implementing this desideratum is tocombine two single DACs to form the DAC stage 220. As may be seen inFIG. 4, the DAC stage 220 is formed of a first, 20 bit DAC 220 a, alongwith a second, 12 bit DAC 220 b. The analogue output of each DAC 220 a,220 b is combined along with the fed back analogue damping signal fromthe analogue damping section 240 to form the non-inverting input to theoperational amplifier 230.

As an alternative to the use of two DACs 220 a, 220 b, the DAC stage 220could instead achieve the desired degree of resolution by using a veryfast switching between two values, if the switching time is much fasterthan the time constant of the power stage in the magnet current source80.

Although in FIG. 4, the DAC stage 220 is shown separate from thecontroller 130 and the operational amplifier/current source 80, it willof course be understood that the DAC stage 220 can form a part of thecontroller 130 or, alternatively, a part of the amplification stage.

The approach to magnetic flux density control illustrated by thearrangement of FIGS. 3 and 4, wherein the controller 130 is digital andso are the inputs to it along with the control signal output, means thatonly a small part of the system control takes place in the analoguedomain, where temperature sensitivity may be an issue. In particular inthe arrangement of FIG. 4, the only potential sources of temperaturedrift are in the (analogue) amplification module 250 and at the magneticfield sensor 140. As to the amplification module, temperaturefluctuations that might influence the magnet current are measuredindirectly by the magnetic field sensor, and are thus fed back andcontrolled.

The other temperature sensitive part of the control system is themagnetic field sensor 140 (which produces an analogue signal output) andthe ADC (not shown in FIG. 4) that converts the analogue magnetic fluxdensity value to a digital signal. As explained above, in preference,the ADC forms a part of the field probe so that the location of anypotentially problematic temperature variations is strictly confined.Although digital magnetic field sensors are available, they are unableto provide the necessary degree of digital resolution and, moreover, areunsuitable for the magnetic flux densities contemplated in the massspectrometer FIG. 3.

FIG. 5 shows, in schematic block form, an arrangement for the magneticfield sensor 140 that seeks to address temperature instability at thatmagnetic field sensor 140.

In the arrangement of FIG. 5, the analogue output of the magnetic fieldsensor 140 is amplified by sensor amplifier 300 and then converted froman analogue to a digital signal with ADC 310. The digital output of theADC 310 is filtered at filter 320 and the filter digital output providesthe variable digital input signal to the controller 130.

It is desirable to carry out filtering of the magnetic field sensoroutput after it has been converted into a digital signal by the ADC 310.Digital filtering provides, when employed correctly, a bettercombination of smoothing and time resolution than may be achieved usingresistor/capacitor (RC) type analogue filters.

A particularly preferred arrangement of filter 320 is an infiniteimpulse response filter, because that requires fewer data points tofilter, compared with FIR filters. A particularly preferredimplementation may be a Chebyshev type I filter, as such a filter isvery sharp and has no ripple in the stop band. A sharp filter isdesirable because the time resolution is maintained to a high degree.

As an alternative to the foregoing, an elliptic filter might be employedinstead.

The magnetic field sensor 140 may be Hall sensor, a magnetoresistivesensor, an AMR sensor, a GMR sensor, a CMR sensor or a TMR sensor, forexample. Particularly preferred is a magneto-resistive sensor in theform of field plates, which is a magnetoresistive sensor cut from asingle crystal. Such field plates have a high dynamic range compared toHall sensors. Also, Hall sensors tend to suffer from the problem of“popcorn” noise and thermal load due to the perpendicular Hall current.The result of a relatively flat characteristic curve is that relativelyhigh Hall currents are in turn needed. On the other hand, single crystalHall effect sensors may provide an acceptable improvement overtraditional Hall sensors.

Returning to FIG. 5, temperature control of the magnetic field sensor140, the sensor amplifier 300 and ADC 310 is achieved by the use of atemperature sensor 330. The output signal of the temperature sensor maybe employed, in a simpler arrangement, directly to control the ADC 310:in particular the input of the temperature sensor 330 is employed by theADC 310 to correct the analogue magnetic field sensor signal using aknown signal/temperature relation.

The preferred manner of temperature control, however, is as shown inFIG. 5. A temperature controller 340 receives the signal from thetemperature sensor 330 as a first, variable input. A set point input isalso supplied to the temperature controller 340. The temperaturecontroller 340 produces a control output signal that is used to controla heater 350 so that a closed loop thermal control is achieved.

In addition to, or instead of, a heater 350, a cooler such as a Peltiercooler may be employed.

It is desirable, in order further to optimize temperature control, thateach of the temperature sensitive components in FIG. 5 (all of thecomponents save for filter 320) be contained within a closed housing(shown as dotted line 360), with thermal insulation inside.

Turning now to FIG. 6, an alternative embodiment of a control system isshown in schematic block form. Components common to FIGS. 3, 4 and 6 arelabelled with like reference numbers. Furthermore, for the avoidance ofrepetition, those parts of the control system common to FIGS. 3, 4 and 6will also not be described again in detail.

In FIG. 6, a digital set point value is generated by the FPGA 210. Thisprovides a first, set point digital input to the controller 130. Themagnetic field sensor 140 provides a digital, variable input signal tothe controller 130. The output of the digital controller 130, aspreviously, is converted to an analogue signal that is then amplified inthe amplifier module 250 for generation of a demand current for thecoils of the magnet 70.

In the arrangement of FIG. 6, however, a further input to the controller130 is provided from the detector 120 (see also FIG. 3). The detectoroutput is either from a Faraday cup or from an SEM. A data logger 400processes the output of the ion detector 120. That processed output mayeither be used directly to provide a further control to the controller130, or may be pre-processed using a computer or other microprocessor410. The purpose of using the output of the ion detector 120 as afurther input to the controller 130 will be explained in the followingsection, which concerns the calibration/tuning of the controller 130.

Calibration/Tuning of the Settings of the Control System

Techniques for calibrating or tuning the controller settings for thecontrol system shown in FIGS. 3, 4 and 6 will now be described. Bycalibrating or tuning is meant the process of determining optimalconstants for the control system at a variety of different magnetic fluxdensities. In the embodiments of FIGS. 3, 4 and 6, the controller 130employs PID control, and the following techniques result in thederivation of the proportional gain and the integral and differentialtime constants for different flux densities and also when attempting totransition rapidly between two different magnetic flux densities.

The calibration techniques all rely upon the sharpness of the edge of amass spectral peak in a typical magnetic spectrum. A typical such peakis shown in FIG. 7, which is a plot of intensity at the ion detector 120(arbitrary units) as a function of magnetic flux density for a magneticsector mass spectrometer having an instrument resolution of 21500.

At both peak edges (leading and trailing edges), the slope of the plotis very high; this means a very small variation in the magnetic fluxdensity value results in a marked effect on the measured intensity.Therefore, measuring the intensity at the peak edge provides anextremely precise way to measure any changes in the magnetic fluxdensity. By determining the slope of the peak at the peak edge, theintensity of the peak can be converted into a magnetic flux densityvalue.

Assuming a linear behaviour between 5% and 95% of the peak height, andfor a resolving power of 21500 (the resolving power for the peak in FIG.7), a change in the magnetic flux density of 1 ppm would result in achange in the measured intensity of 5% of the maximum value of the peak,and 10% of the value at half the peak height.

This technique provides further advantages. Simply measuring themagnetic flux density using the magnetic field sensor 140 provides auseful “snapshot” of the flux density, but is limited to a measurementonly of the flux density in the immediate vicinity of the magnetic fieldsensor 140. By measuring the magnetic flux density using the peak edge,by contrast, an integral over the area of the magnet covered by the ionbeam 30 is measured. This may be particularly advantageous when jumpingbetween first and second flux densities, because the slower processes,e.g. due to the reorganisation of the magnetic domains, and the remanentmagnetisation in the magnet core, are dependent on the position insidethe magnet gap. This is especially important for small magnetic fieldvalues.

For optimal system control, it is desirable to obtain controllersettings both for static and dynamic magnetic fields. Mass peak edgescan be used to obtain both.

Determining the Controller Settings at a Static Magnetic Flux Density.

The first task is to align the peak edge with the detector 120. Themagnetic flux density B and the acceleration potential U₀ are adjustedso that ions of a particular mass to charge ratio are directed towardsthe detector 120. Once the edge of the peak has been located byadjusting the parameters of the mass spectrometer, a perturbation isapplied to the mass spectrometer parameters to introduce slightoscillations within the control system. From the oscillation frequencythe time constant of the control loop is determined and, for a PIDcontrol algorithm, the I and D settings can be determined. There aremany ways of determining the control settings heuristically orotherwise: Ziegler Nichols, Chien, Hrones and Reswick, and others, eachof which will be well known to those skilled in the art of closed loopcontrol. Also, the setting for P can be varied until the oscillationsare no longer visible in the intensity.

This technique permits the derivation of optimized settings for thecontroller for the particular magnetic flux density employed in theinitial calibration experiment defined above. In particular, the derivedsettings can be stored for use in any subsequent analysis, in which themagnetic flux density is the same or similar to that at which thesettings were derived.

By repeating the analysis at different values of magnetic flux density,an array or matrix of controller settings can be generated, eachcontroller setting being associated with a respective flux density. Thematrix can be stored for subsequent use as a look up table or can beused to derive or calculate a functional relationship between B and thecontroller settings (eg between B and PID).

As explained previously, the equation of motion governing ion movementin a magnetic sector mass spectrometer contains four parameters that canin principle be changed. Of these, however, the radius of the curvedpath of the ions is essentially fixed in that only ions travelling alonga specific path defined by the radius r_(m) will arrive at the detector120. This means that, in order to obtain the controller settings formultiple values of B, either the accelerating potential U₀ or the massto charge ratio of the ions must be changed. In one preferredembodiment, the accelerating voltage is changed. Because, for a givenmass, the magnetic flux density is proportional to the square root ofthe voltage, modifying the accelerating voltage by a factor of 4 isequivalent to a factor of 2 variation in the magnetic flux density.

In order to extend the determined controller settings across a widerrange of magnetic fields (i.e. beyond what can be ascertained simply bymodifying U₀), different mass to charge ratio ions must be employed. Forexample, if CO₂ is introduced into the ion source 20, there are fragmentmasses of considerable intensity at the masses 12, 22, 28, 44.Therefore, with one gas, and different accelerating voltage values U₀,U₁, U₂ . . . , the controller settings for the whole mass range up tomass 44 can be ascertained.

Determining the Controller Settings for a Changing Flux Density.

If the magnet field is modified step wise, and if the final magneticflux density value is a value where the mass peak is at a raising orfalling edge as shown in FIG. 7, the reaction of the system to astepwise jump can also be determined and optimized. Optimal controllerparameters can in particular be ascertained, for example, in accordancewith the second rule by Ziegler Nichols, or by other algorithms.Optimizing the controller settings for a jump between two magnetic fluxdensities allows the speed at which the jump can take place to beoptimized in turn. Also, when considering the derivation of controllersettings for a dynamic magnetic field, the effect that the magnetic fluxdensity—and the time behavior of it—is dependent on the position, andespecially the difference between the integral that the ion beam 30covers and the position of the magnetic field sensor 140, is alsocalibrated out.

Depending on the starting magnetic flux density value, this techniquecan be repeated for different jump sizes. Also, in a manner similar tothe procedure outlined above, different end values of the magneticfield/flux density can be obtained.

The system behaviour, and especially the dynamic behaviour, particularlyat small magnetic field/flux density/mass values, is dependent upon theposition within the magnet 70. This means that, for a wide simultaneousmass range and a low mass, e.g. for determining He³ and He⁴simultaneously, the controller settings are dependent upon the mass tocharge ratio of the ions, or, more exactly, the position of the detector120 as well. In such highly specialised cases, it may be preferable todetermine the controller settings independently for different collectorpositions.

Determining the Controller Settings for Both Static and Dynamic Fields.

The controller settings obtained by jumping between two magnetic fluxdensities can be combined with those obtained (separately) from staticfield measurements. During a jump between two flux densities, in generalterms it is desirable that the final flux density (for measuring ions ofthe final m/z) should be reached as quickly as possible; therefore thecontroller settings are optimized with this goal in mind. After thejump, the stability of the magnetic flux density is of utmostimportance; therefore after having reached the second magnetic fluxdensity, the controller settings can be switched to use those derivedinstead from the static calibrations for that particular set of massspectrometer parameters. In a transition period, a combination of thestatic and dynamic controller settings may be employed, where the longterm drift effects determined by the controller settings during a jumpare taken into account, but otherwise the settings obtained by thestatic calibration are employed.

The various different methods of determining the controller settings,both for static and dynamic magnetic fields, may be carried outautomatically, without user interaction. Determination of the settingsmay be repeated e.g. on a yearly or biennial basis and/or after bakingthe system. It is also desirable to carry out the controller settingdetermination when the instrument is parameterized for a high resolvingpower, in order to obtain maximum precision during ion analysis.

Using Peak Edges for Magnetic Flux Density Control.

Turning to FIG. 8, a specific arrangement of ion collectors (eg Faradaycups) forming the ion detector 120 is shown.

Often, not all masses falling into the mass range of the detector 120are used for measuring isotope ratios. There might be a mass that is notfrom the analyte gas, e.g. Ar (mass 40) when measuring CO2 (mass 44).Or, alternatively, not all isotopes coming from the analyte gas are ofinterest for a specific analytical problem. In either case, the ionspecies that is identified to be present but not of analytical interestcan be used as a “sacrificial” mass for collection in a variablemulticollector ion detector as shown in FIG. 8.

As seen in that Figure, the ion detector 120 comprises a plurality ofspatially separated ion collectors 500, 510, 520. The relative positionsof the ion collectors are adjustable: in particular, the third ioncollector 520 position may be adjustable alone, and/or two or all threeof the collectors may be relatively moveable. Moreover, in oneembodiment, the collector positions may be manually adjusted, whereas inother embodiments, the digital controller or another microprocessor mayadjust the position of the ion collectors in order to achieve the effectbelow.

By adjusting one or more of the accelerating potential, the magneticflux density, and the absolute/relative collector positions, ions of afirst mass to charge ratio (m/z)₁ are directed towards a first collector500. Ions of a second mass to charge ratio (m/z)₂ are directed towards asecond collector 510. Meanwhile, the third collector, 520, can bepositioned in such a way that, during analysis of an analyte, thesacrificial mass, whose mass to charge ratio is (m/z)₃, is at the peakedge. As explained above, the signal of this third collector 520 thusprovides a very precise way to measure changes in the magnetic fluxdensity of the magnet 70. The other masses (m/z)₁ and (m/z)₂ areanalysed via the first and second collectors 500, 510, as usual.

The signal from the third collector 520 may be fed back into the magnetcurrent source 80 (either electronically or by the data logger 400, orvia the computer 410—see FIG. 6), in order to stabilize the magneticflux density further.

There are two cases where this feedback is especially advantageous. Thefirst case is where there is a small shoulder at the edge of themeasurement mass. Here, it is mandatory to keep the magnetic fluxdensity as stable as possible: by small changes in the magnetic fluxdensity the shoulder would be left. Stabilizing the flux density by theprocedure explained above would increase the accuracy. Because avariation in the flux density of 1 ppm would be equivalent to avariation in the signal intensity of 5% of the peak value, thistechnique could be used to gain flux density stabilities far into thesub-ppm range.

The second particularly advantageous use of the feedback is whenmeasuring a small intensity with a SEV at the foot of a large peak.Here, it is important that the SEV is protected from the much largerintensity of the neighbouring mass, and this protection can be doneusing the procedure explained above.

Although FIG. 8 shows two analyte ion collectors, it will be understoodof course that other quantities of analyte ion species can be employed(1, 3, 4 . . . ) Moreover, there may be circumstances where 2 or moredifferent sacrificial masses are desirable.

The foregoing detailed description has described only a few of the manyforms that this invention may take. For this reason the detaileddescription is intended by way of illustration and not by way oflimitation. Various modifications and additions to the specificembodiments that have been described, will be contemplated by theskilled person. For example, although the embodiments above aredescribed in the context of a digital PID controller, it will beunderstood that various other controllers are contemplated, such as, butnot limited to, a state controller with observer; an “interdependent”network control; direct synthesis methods; a minimal prototypealgorithm; Dahlin's Algorithm; Vogel-Edgar Algorithm; Internal ModelControl; Digital Feedforward control; General linear controller; R(s)U(s)=T(s) Ysp(s)−S(s) Y(s); R, S, T are polynomials of arbitrary order;Discrete-time linear MISO controllers; Model predictive Control; and/orFuzzy control.

The invention claimed is:
 1. A control system for controlling a magnet(70) of a magnetic sector mass spectrometer (10), comprising: a magneticfield sensor for sensing the magnetic field of the magnet (70) andgenerating an output representative thereof; a set point generator (210)configured to generate an output representative of, or related to, adesired magnetic field of the magnet (70); and a controller (130)configured to receive a variable input signal from the output of themagnetic field sensor and a set point input signal from the output ofthe set point generator (210), and to generate an output from which isderived a control signal for controlling a current to the magnet (70) soas to control, in turn, the magnetic field thereof; and a processor;wherein the magnetic field sensor for sensing the magnetic field is anion detector (120) for detecting ions passing through the magneticsector mass spectrometer (10), the ion detector (120) being configuredto generate a detector output signal representative of the quantity ofions incident upon the detector (120); and wherein the processor isarranged to receive the detector output signal, and configured tocalculate a controller setting based upon the detection of ions at thedetector (120), and wherein the control system is arranged to apply tothe controller (130) a selected one of a plurality of differentcontroller settings calculated by the processor based upon the detectionof ions at the detector (120), in accordance with the desired magneticfield of the magnet (70).
 2. The control system of claim 1, wherein thecontrol system is configured to control the parameters of the massspectrometer (10), so as to align an edge of a mass spectral peak of anion species with the ion detector (120), and to determine, by perturbingthe mass spectrometer parameters when the peak edge is aligned with theion detector (120), controller settings suitable for the particularmagnetic flux density of the magnet (70) generated in accordance withthe corresponding magnet current control signal.
 3. A magnetic sectormass spectrometer (10) comprising: an ion source (20) arranged togenerate a beam of ions having a mass to charge ratio m/z; an ionaccelerator arranged to accelerate ions to a potential U_(o); a controlsystem according to claim 1; a magnet (70) under the control of thecontrol system, arranged to divert the accelerated ions along a circularpath in accordance with m/z, U_(o) and the magnetic flux density withinthe magnet (70).
 4. The magnetic sector mass spectrometer (10) of claim3, further comprising a second ion detector (500, 510) also positioneddownstream of the magnet but spatially separated in a transversedirection perpendicular to the direction of travel of the ion beam;wherein the ion beam comprises ions of first and second mass-to-chargeratios, the processor being configured to control the parameters of themass spectrometer so as to align an edge of a mass spectral peak of ionsof the first mass-to-charge ratio with the ion detector (520) which issensing the magnetic field, whilst ions of the second mass to chargeratio are directed toward the second ion detector (500, 510).
 5. Amethod of controlling a magnetic field generated by a magnet (70) in amagnetic sector mass spectrometer (10), comprising: sensing the magneticfield of the magnet (70) and generating a sensor output representativethereof; generating a set point signal representative of, or related to,a desired magnetic field of the magnet; applying one of a plurality ofdifferent controller settings to a system controller, the controllersetting which is applied being selected in accordance with systemparameters of the magnetic sector mass spectrometer (10); at the systemcontroller (130), receiving, as a first input, a variable input signalderived from the sensor output, and, as a second input, the set pointsignal, and generating a control signal output which is determined bythe first and second inputs and the particular controller settingapplied to the system controller (130); and controlling the currentsupplied to the magnet (70) by a magnet power supply (80), based uponthe control signal output, so as, in turn, to control the magnet fieldgenerated by the magnet (70), further comprising: generating ions of afirst mass to charge ratio (m/z)₁; accelerating the ions of mass tocharge ratio (m/z)₁ to an energy z₁U_(o), where U_(o) is an electricalpotential applied to the ions; generating a magnetic field, having amagnetic flux density B_(m), in the magnet; directing ions of mass(m/z)₁ into the magnet (70), where they follow a curved path; anddetecting, with an ion detector (120), those ions that have followed acurved path within the magnet of radius r_(m) defined byr _(m) =B _(m) ⁻¹ (2.U _(o).(m/z)₁)^(1/2); and adjusting the parametersof the magnetic sector mass spectrometer (10) so as to cause an edge ofa mass peak corresponding with the ions of mass (m/z)₁ to align with theion detector (120) for detecting a change in an ion intensity at the iondetector (120) corresponding to a change in the magnetic field forsensing the magnetic field of the magnet (70).
 6. The method of claim 5,wherein the adjusting step comprises adjusting the acceleratingpotential U_(o) so as to align the peak edge with the ion detector(120).
 7. The method of claim 5, further comprising: perturbing theparameters of the magnetic sector mass spectrometer (10) once the edgeof the mass peak has been aligned with the ion detector (120), deriving,from the applied perturbation, a first static field controller settingfor the system controller (130) for application to the system controller(130) for the magnetic flux density B_(m); and applying that derivedfirst static field controller setting to the system controller (130) forsubsequent detection of ions at that magnetic field B_(m).
 8. The methodof claim 5, further comprising: accelerating the ions of mass to chargeratio (m/z)₁ to an energy z₁U₁ where U₁≠U_(o); generating a magneticfield, having a magnetic flux density B_(n), in the magnet (70), whereB_(m)≠B_(n); directing ions of mass (m/z)₁ into the magnet (70) wherethey follow a curved path; and detecting, with the ion detector (120),those ions that have followed a curved path within the magnet of radiusr_(n) defined by r_(n)=B_(n) ⁻¹ (2.U₁.(m/z)₁)^(1/2); wherein adjustingthe accelerating potential U₁ so as to align the peak edge with the iondetector (120) and wherein the controller settings for B_(n) aredifferent to the first static field controller settings for B_(m). 9.The method of claim 8, further comprising: perturbing the parameters ofthe magnetic sector mass spectrometer (10) once the edge of the masspeak has been aligned with the detector (120); deriving, from theapplied perturbation, a second static field controller setting for thesystem controller (130) for application to the system controller (130)for the magnetic flux density B_(n); and applying that derived secondstatic field controller setting to the system controller for subsequentdetection of ions at that magnetic field B_(n).
 10. The method of claim8, further comprising determining a transitioning field controllersetting for a transition from B_(m) to B_(n); and applying thattransitioning field controller setting to the system controller (130)for subsequent detection of ions when transitioning from B_(m) to B_(n).11. The method of claim 5, further comprising: generating ions of asecond mass to charge ratio (m/z)₂; accelerating the ions of mass tocharge ratio (m/z)₂ to an energy z₂U₁, where U₁ is an electricalpotential applied to the ions; generating a magnetic field, having amagnetic flux density B_(n), in the magnet (70), directing the ions ofmass (m/z)₂ into the magnet (70), where they follow a curved path; anddetecting, with the ion detector (120), those ions that have followed acurved path within the magnet (70) of radius r_(n) defined byr_(n)=B_(n) ⁻¹ (2.U₁.(m/z)₂)^(1/2); wherein: adjusting the systemparameters of the magnetic sector mass spectrometer (10) so as to causean edge of a mass peak corresponding with the ions of mass (m/z)₂ toalign with the detector (120), B_(n)≠B_(m) and further wherein thestatic field controller settings for the system controller are differentfor B_(n) and B_(m).
 12. The method of claim 11, further comprisingdetermining a transitioning field controller setting for a jump inmagnetic flux density between B_(m) and B_(n), and applying thattransitioning field controller setting to the system controller (130)for subsequent detection of ions when transitioning between B_(m) andB_(n).
 13. The method of claim 12 further comprising: applying the saidtransitioning field controller setting determined for a jump from B_(m)to B_(n), when the controller (130) subsequently controls the magnet(70) so as to change the magnetic flux density from B_(m) to B_(n), andapplying the second static field controller setting when the magneticflux density is subsequently to be maintained at B_(n) once B_(n) hasbeen reached, and wherein the second static field controller settingdiffers from the transitioning field controller setting.
 14. The methodof claim 5, further comprising: generating ions of a second mass tocharge ratio (m/z)₂; accelerating the ions of mass to charge ratio(m/z)₂ to an energy z₂U₁, where U1 is an electrical potential applied tothe ions; generating a magnetic field, having a magnetic flux densityB_(n), in the magnet, directing the ions of mass (m/z)₂ into the magnet(70), where they follow a curved path; and detecting, with the iondetector (120), those ions that have followed a curved path within themagnet of radius r_(n) defined by r_(n)=B_(n) ⁻¹ (2.U₁.(m/z)₂)^(1/2);wherein r_(m)≠r_(n) but U_(o)=U₁, so that ions of (m/z)₁ travel along adifferent path to ions of (m/z)₂ and wherein setting the parameters ofthe magnetic sector mass spectrometer (10) so that ions of the firstmass to charge ratio (m/z)i, are aligned with the ion detector (520)which is sensing the magnetic field, whilst ions of the second mass tocharge ratio (m/z)₂ align with a second ion detector (500, 510)spatially separated from the first ion detector.
 15. A method ofdetermining controller settings for a controller (130), wherein thecontroller (130) controls a magnetic field generated by a magnet (70) ina magnetic sector mass spectrometer (10) by measuring the magnetic fluxdensity of the magnetic field with a magnetic field sensor, the methodcomprising the steps of; generating ions having a mass to charge ratiom/z; accelerating the ions of mass to charge ratio m/z; generating amagnetic field, having a magnetic flux density B_(m), in the magnet(70); directing ions of mass to charge ratio m/z into the magnet (70),where they follow a curved path towards an ion detector (120) which isthe magnetic field sensor measuring the magnetic flux density; adjustingthe parameters of the magnetic sector mass spectrometer (10) so as tocause an edge of a mass peak corresponding with the ions of mass tocharge ratio m/z to align with the detector (120); perturbing theparameters of the magnetic sector mass spectrometer (10) once the edgeof the mass peak has been aligned with the detector (120); deriving,from the applied perturbation, a first static field controller settingfor the system controller (130) for application to the system controller(130) for the magnetic flux density B_(m); and applying that derivedfirst static field controller setting to the system controller (130) forsubsequent detection of ions at that magnetic field B_(m).
 16. A methodof determining controller settings for a controller (130), wherein thecontroller (130) controls a magnetic field generated by a magnet (70) ina magnetic sector mass spectrometer (10) by measuring the magnetic fluxdensity of the magnetic field with a magnetic field sensor, the methodcomprising the steps of: generating ions; accelerating the ions towardsthe magnet (70); generating a first magnetic field, having a firstmagnetic flux density B_(m), in the magnet (70); directing ions into themagnet (70), where they follow a curved path towards an ion detector(120) which is the magnetic field sensor measuring the magnetic fluxdensity; adjusting the magnetic field in the magnet (70) to a secondmagnetic flux density B_(n), at which an edge of a peak of ions isaligned with the ion detector (120); perturbing the parameters of themagnetic sector mass spectrometer (10) once the edge of the mass peakhas been aligned with the detector (120) at the second magnetic fieldB_(n); deriving, from the applied perturbation, a changing fieldcontroller setting for the system controller (130), for application tothe system controller (130) when the magnetic flux density changes fromB_(m) to B_(n); and applying that derived changing field controllersetting to the system controller (130) for subsequent changes in theapplied magnetic field between B_(m) and B_(n).
 17. A method ofcontrolling a magnetic field generated by a magnet (70) in a magneticsector mass spectrometer (10), comprising: generating ions of aplurality of ion species; accelerating the generated ions with anelectrical potential U₀; directing the accelerated ions into the magnet(70), the magnet (70) being configured to generate a magnet field offlux density B so as to cause ions entering it to be deflected along acurved path; and detecting ions exiting the magnet (70) at an iondetection arrangement (120); wherein ions of a first sacrificial ionspecies have a mass to charge ratio (m/z)₁ and follow a first curvedpath within the magnet (70) whilst ions of a second, analyte ion speciesdifferent to the sacrificial species have a mass to charge ratio (m/z)₂and follow a second curved path, different to the first curved path,within the magnet (70); and further wherein the ion detectionarrangement has a plurality of spatially separated detectors (500, 510,520); the method further comprising: adjusting one or more of the fluxdensity B, the acceleration potential U₀ and/or the position of adetector or detectors (500, 510, 520) in the ion detection arrangement(120), so that ions of the sacrificial species are directed toward afirst detector (520) in order that the edge of a mass peakrepresentative of those ions of the sacrificial species is aligned withthe first detector (520), whilst ions of the analyte ion species aredirected toward a second detector (500, 510), spatially separated fromthe first detector (520), so that a mass peak representative of thoseanalyte ions is generally aligned with the second detector (500, 510)away from the mass peak edges; and controlling the magnetic flux densityB by monitoring changes in the detector intensity at the peak edge ofthe sacrificial mass, so as to maintain the alignment of the analyteions with the said second detector (500, 510).
 18. A magnetic sectormass spectrometer (10) according to claim 3: the ion source (20) isarranged to generate a beam of ions containing a plurality of ionspecies each having a mass to charge ratio (m/z)_(i); the ionaccelerator is arranged to accelerate the ions in the ion beam to apotential U_(o); the ion source (20) is arranged to generate ions of afirst sacrificial ion species having the first mass to charge ratio(m/z)₁ which follow a first curved path within the magnet (70), and togenerate ions of a second, analyte ion species different to thesacrificial species having the second mass to charge ratio (m/z)₂ whichfollow a second curved path, different to the first curved path, withinthe magnet (70), and further wherein the ion detection arrangement (120)has a plurality of spatially separated detectors (500, 510, 520); thecontrol system being configured to adjust one or more of the fluxdensity B, the acceleration potential U₀ and/or the position of adetector or detectors (500, 510, 520) in the ion detection arrangement(120), so that ions of the sacrificial species are directed toward theion detector (520) which is sensing the magnetic field in order that theedge of a mass peak representative of those ions of the sacrificialspecies is aligned with the ion detector (520), whilst ions of theanalyte ion species are directed toward the second detector (500, 510),spatially separated from the ion detector (520) which is sensing themagnetic field, so that a mass peak representative of those analyte ionsis generally aligned with the second detector (500, 510) away from themass peak edges; and further wherein the ion detector (520) which issensing the magnetic field, has an output signal representing intensityat the peak edge of the sacrificial mass, from which the said variableinput signal for the controller (130) is generated.